//
// Created by vivi on 09/02/2018.
//

#pragma once

#include "core/precompiled/precompiled.h"
#include "core/util/eigenutil.h"
#include <Eigen/Eigen>

namespace HairEngine {
	/*
	 * A collision detection interface, it tells the signed distance (positive is outside) and the
	 * gradient (or normalized gradient) to the point that we need to check, the interface is not implemented
	 * and it is a virtual class
	 */
	class Collider {
	Public:
		/*
		 * It is worth noting that the return distance is signed (which is positive outside)
		 * and negative inside, sometimes the gradient is also need, passing a pointer to it
		 * the function will also assign the gradient
		 */
		virtual float distance(const Eigen::Vector3f & pos, Eigen::Vector3f * outGradientPtr = nullptr) const = 0;


	Protected:
	};
}
